/* 
 * Created on 2007-2-20
 * Last modified on 2007-2-20
 * Powered by YeQiangWei.com
 */
package com.yeqiangwei.util;

import java.lang.reflect.InvocationTargetException;

import org.apache.log4j.Logger;

import com.yeqiangwei.util.Validator;

public class BeanUtils {
	
	private static final Logger logger = Logger.getLogger(BeanUtils.class);

	public BeanUtils() {
			
	}

	public static void copyProperties(Object obj, Object o){
		if(Validator.isEmpty(obj)||Validator.isEmpty(o)){
			obj = null;
			o = null;
			return ;
		}
		try {
			org.apache.commons.beanutils.BeanUtils.copyProperties(obj, o);
		} catch (IllegalAccessException e) {
			logger.error(e.toString());
		} catch (InvocationTargetException e) {
			logger.error(e.toString());
		}
	}


}
